<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
	    <base href="<%=basePath%>">
	    <title>新增文章</title>
	    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	    <link href="back/css/main.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="back/js/jquery-1.7.2.js"></script>      
		<script charset="utf-8" src="back/kindeditor/kindeditor.js"></script>
		<script charset="utf-8" src="back/kindeditor/lang/zh_CN.js"></script>
		<script charset="utf-8" src="back/kindeditor/plugins/code/prettify.js"></script>
		<link href="back/kindeditor/themes/simple/simple.css" rel="stylesheet" type="text/css" />
		<link href="back/kindeditor/themes/default/default.css" rel="stylesheet" type="text/css" />
		
		<script language="javascript" type="text/javascript" src="back/mydate/WdatePicker.js"></script>
		
		<script>
			
			KindEditor.ready(function(K) {
				var editor1 = K.create('textarea[name="arti.content"]', {
					cssPath : 'kindeditor/plugins/code/prettify.css',
					uploadJson : 'artiImage_upload.action',
					fileManagerJson : 'file_manager_json.jsp',
					allowFileManager : false,
					afterCreate : function() {
						var self = this;
						K.ctrl(document, 13, function() {
							self.sync();
							document.forms['articleForm'].submit();
						});
						K.ctrl(self.edit.doc, 13, function() {
							self.sync();
							document.forms['articleForm'].submit();
						});
					}
				});
				var editor2 = K.create('textarea[name="arti.summary"]', {
					resizeType : 1,
					allowPreviewEmoticons : false,
					allowImageUpload : false,
					items : [
						'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|', 'emoticons', 'link']
				});
				prettyPrint();
			});

		</script>
	</head>
	<body>
		
		<form id="articleForm" name="articleForm" action="arti_add" method="post">
			
			<table class="table" cellspacing="1" cellpadding="2" width="100%" align="center" border="0">
               
					<tr>
						<th class="bg_tr" align="left" colspan="2" height="35">
							&nbsp;
							<input type="button" value="新增文章" onClick="javascript:window.location.href='#';" />
							<input type="button" value="管理文章" onClick="javascript:window.location.href='#';" />
						</th>
					</tr>
					<tr>
						<td height="44" align="right" class="td_bg">
							所属类别：
						</td>
						<td class="td_bg">
							<select name="selectedNavId" id="classId">
								<option value="<s:property value='nav.navId' />" selected><s:property value="nav.title" /></option>
								<s:iterator value="navList" id="nl">
									<option value="<s:property value='#nl.navId' />">&nbsp;&nbsp;├&nbsp;<s:property value="#nl.title" /></option>
								</s:iterator>
								
							</select>
							&nbsp;<span id="classIdTip" style="height: 22px;"></span>
						</td>
					</tr>

					<tr>
						<td width="13%" height="41" align="right" class="td_bg">
							文章标题：
						</td>
						<td class="td_bg" width="87%">
							<input value="" id="title" name="arti.title"
								style="width: 300px;" tabindex="1" onKeyUp="MyJs.copyContent('title','keyword')" />
						</td>
					</tr>
					<tr>
						<td width="13%" height="45" align="right" class="td_bg">
							文章简介：
							<span class="TableRow2"></span>
						</td>
						<td class="td_bg" width="87%" height="167">
							<textarea id="summary" name="arti.summary"
								style="width:625px;height:160px;"></textarea>
						</td>
					</tr>
					<tr>
						<td width="13%" height="41" align="right" class="td_bg">
							文章关键字：
						</td>
						<td class="td_bg" width="87%">
							<input value="" id="keyword" name="arti.key"
								style="width: 300px;" tabindex="1" />
							&nbsp;<span id="keywordTip" style="height: 22px;"></span>	
						</td>
					</tr>

					<tr>
						<td width="13%" height="45" align="right" class="td_bg">
							文章内容：
							<span class="TableRow2"></span>
						</td>
						<td class="td_bg" width="87%" height="167">
							<textarea id="content" name="arti.content"
								style="width:625px;height:350px;">&nbsp;</textarea>
						</td>
					</tr>
					
					<tr>
						<td width="13%" height="41" align="right" class="td_bg">
							优先级：
						</td>
						<td class="td_bg" width="87%">
							<input value="100" id="source" name="arti.priority"
								style="width: 300px;" tabindex="1" />
							
						</td>
					</tr>
					
					<tr>
						<td width="13%" height="41" align="right" class="td_bg">
							文章作者：
						</td>
						<td class="td_bg" width="87%">
							<input value="admin" id="author" name="arti.author"
								style="width: 300px;" tabindex="1" />
							&nbsp;<span id="authorTip" style="height: 22px;"></span>	
						</td>
					</tr>

					<tr>
						<td width="13%" height="41" align="right" class="td_bg">
							文章来源：
						</td>
						<td class="td_bg" width="87%">
							<input value="本站原创" id="source" name="arti.source"
								style="width: 300px;" tabindex="1" />
							&nbsp;<span id="sourceTip" style="height: 22px;"></span>	
						</td>
					</tr>

					<tr>
						<td width="13%" height="41" align="right" class="td_bg">
							创建时间：
						</td>
						<td class="td_bg" width="87%">
							
							<input readonly class="Wdate" name="arti.uploadDate" style="width: 300px;" tabindex="1" type="text" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" /> <font color=red>&lt;- 点我弹出日期控件</font>
								
							&nbsp;<span id="createtimeTip" style="height: 22px;"></span>	
						</td>
					</tr>

					<tr>
						<td width="13%" height="44" align="right" class="td_bg">
							<span class="TableRow2"><b></b> </span>
						</td>
						<td class="td_bg" width="87%">
							&nbsp;
							<input type="submit" value="确认添加" />
							<input type="reset" value="重新填写" />
						</td>
					</tr>
			</table>
		</form>
	</body>


</html>
